EN FR
EN FR


Section: Software

JSTY: Logical Auditing of JavaScript Programs

Participants : Karthikeyan Bhargavan [correspondant] , Sergio Maffeis [Imperial College] , Ravinder Shankesi [U. of Illinois at Urbana Champain] .

JSTY is a runtime monitoring and logical auditing framework for JavaScript web applications. It has three components: (1) a contract language for JavaScript that enables programmers to annotate their scripts with assumptions and goals written as first-order logic pre- and post-conditions; (2) a runtime monitor implemented as a browser extension in the web browser Chrome that interprets these contracts at runtime and generates proof obligations for an SMT solver; (3) a logical auditor that checks proof obligations and maps counterexamples to violations of program correctness goals.

The target applications for JSTY include browser extensions as well as website scripts. In the case of browser extensions, our goal is to help extension writers to test their code by annotating it with logical contracts and auditing the code with JSTY. For website scripts, our goal is to check whether a website script obeys a generic security policy expressed as pre-conditions on functions in the browser or DOM API. We have used JSTY to analyze a variety of security-critical browser extensions and website scripts and found several vulnerabilities. We are currently incorpotating static checking into JSTY.

JSTY is written in about 1000 lines of JavaScript and we plan a public release in 2012.